﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace PDO.DataPersistence.ServiceProvider
{
    [DataContract(Name = "NotificationMessage")]
    public class NotificationMessage
    {
        public NotificationMessage()
        {
            AdditionalInformation = new Dictionary<string, string>();
        }

        [DataMember]
        public virtual bool GeneralNotification { get; set; }

        /// <summary>
        /// The General Identifer (e.g. a database table name)
        /// </summary>
        [DataMember]        
        public virtual string Category { get; set; }

        /// <summary>
        /// The Specific Identifer (e.g. a database row primary key value)
        /// </summary>
        [DataMember]
        public virtual string Item { get; set; }

        /// <summary>
        /// The List Identifier
        /// </summary>
        [DataMember]
        public string ListIdentifier { get; set; }

        [DataMember]
        public OperationType OperationType { get; set; }

        [DataMember]
        public virtual Guid OrginatingSessionIdentifer { get; set; }

        /// <summary>
        /// Additional Information 
        /// </summary>
        /// <remarks>
        /// As of .NET 3.5, the objects contained within this dictionary must be of base types
        /// </remarks>
        [DataMember]
        public virtual Dictionary<string, string> AdditionalInformation { get; set; }
        
    }
}
